SecondOfYear Function

private function SecondOfYear(time) result(second)

Uses

Gets the second of the year represented by this instance.

Arguments

Type IntentOptional Attributes Name
type(DateTime), intent(in) :: time

Return Value integer(kind=short)


Source Code

FUNCTION SecondOfYear &
!
(time) &
!
RESULT (second)

USE Units, ONLY: &
! Imported parameters:
day, hour, minute

IMPLICIT NONE

! Arguments with intent(in):
TYPE (DateTime), INTENT(IN) :: time

! Local variables:
INTEGER (KIND = short) :: second
!------------end of declaration------------------------------------------------

second = (DayOfYear (time) - 1) * day

second = second + GetHour (time) * hour + GetMinute (time) * minute + &
         GetSecond (time)


END FUNCTION SecondOfYear